package app.pumpkin.com.myandroiddemo.provider;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * 作者：wangshy
 * 时间： 2018/7/12 11:04
 */
public class DbBookOpenHelper extends SQLiteOpenHelper {
    private static final String DB_NAME = "book_provider.db";
    private static final String BOOK_TABLE_NAME = "book";
    private static final String CREATE_BOOK_TABLE = "CREATE TABLE IF NOT EXISTS " + BOOK_TABLE_NAME + "(_id  INTEGER PRIMARY KEY, name TEXT)";

    public DbBookOpenHelper(Context context) {
        super(context, DB_NAME, null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(CREATE_BOOK_TABLE);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
